package com.example.demo01.Entity.mobileEntity;

import org.springframework.stereotype.Component;

@Component
public class ServiceOrderSolved extends ServiceOrder {
    //attributes
    private String adminaccount;
    private String endTime;
    protected Integer id;
    protected String username;
    protected String serviceContent;
    protected String serviceAddress;
    protected Float lon;
    protected Float lat;
    protected String orderTime;
    protected Integer orderState;
    //setter
    public void setAdminaccount(String adminaccount) {
        this.adminaccount = adminaccount;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    //getter
    public String getAdminaccount() {
        return adminaccount;
    }

    public String getEndTime() {
        return endTime;
    }

    //constructors

    public ServiceOrderSolved() {
    }

    public ServiceOrderSolved(String username, String serviceContent, String serviceAddress, Float lon, Float lat, String orderTime, Integer orderState, String adminaccount, String endTime) {
        super(username, serviceContent, serviceAddress, lon, lat, orderTime, orderState);
        this.adminaccount = adminaccount;
        this.endTime = endTime;
    }

    public ServiceOrderSolved(Integer id, String username, String serviceContent, String serviceAddress, Float lon, Float lat, String orderTime, Integer orderState, String adminaccount, String endTime) {
        super(id, username, serviceContent, serviceAddress, lon, lat, orderTime, orderState);
        this.adminaccount = adminaccount;
        this.endTime = endTime;
    }

    //toString
    @Override
    public String toString() {
        return "ServiceOrderSolved{" +
                "endTime='" + endTime + '\'' +
                ", id=" + id +
                ", username='" + username + '\'' +
                ", serviceContent='" + serviceContent + '\'' +
                ", serviceAddress='" + serviceAddress + '\'' +
                ", lon=" + lon +
                ", lat=" + lat +
                ", orderTime='" + orderTime + '\'' +
                ", orderState=" + orderState +
                '}';
    }
}
